package cc.customer.web.saleHelp;

import cc.customer.common.domain.QueryRequest;
import cc.customer.common.domain.ResponseBo;
import cc.customer.saleHelp.domain.CSaleCustomer;
import cc.customer.saleHelp.services.CsaleCustomerService;
import cc.customer.web.sys.controller.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping(value="saleCustomer")
public class SaleCustomerController extends BaseController {


    @Autowired
    private CsaleCustomerService customerService;

    /**查询销售计划客户详情**/
    @RequestMapping(value = "/getPlanCus")
    @ResponseBody
    public Map<String, Object> getPlanCus(CSaleCustomer customer, QueryRequest request){
        return super.selectByPageNumSize(request, () -> this.customerService.selectPlanCus(customer));
    }


    /**立即执行**/
    @RequestMapping(value = "/newSendPlan")
    @ResponseBody
    public ResponseBo newSendPlan(CSaleCustomer customer){
        return customerService.newSendPlan(customer);
    }

}
